﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model.Flow
{
    /// <summary>
    /// 节点模型
    /// </summary>
    public class NodeModel
    {
        /// <summary>
        /// 节点类型
        /// </summary>
        public string type { get; set; } = string.Empty;

        /// <summary>
        /// 节点扩展数据
        /// </summary>
        public NodeExtendModel data { get; set; } = new NodeExtendModel();

        /// <summary>
        /// 节点id
        /// </summary>
        public string id { get; set; } = string.Empty;

        /// <summary>
        /// 节点坐标
        /// </summary>
        public coordinate position { get; set; } = new coordinate();

        /// <summary>
        /// 节点名称
        /// </summary>
        public string label { get; set; } = string.Empty;

        /// <summary>
        /// 节点样式（flow对应的是class，因为语法的原因写成classStyle）
        /// </summary>
        public string @class { get; set; } = "";

        /// <summary>
        /// 连接点目标位置
        /// </summary>
        public string targetPosition { get; set; } = string.Empty;

        /// <summary>
        /// 连接点源位置
        /// </summary>
        public string sourcePosition { get; set; } = string.Empty;

        /// <summary>
        /// 节点样式
        /// </summary>
        public styleModel style { get; set; } = new styleModel();
    }

    public class styleModel
    {

        public int zIndex { get; set; }
        public string width { get; set; }

        public string height { get; set; }
    }
}
